package org.example.api;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.example.domain.query.User;
import org.example.domain.vo.CaptchaVo;
import org.example.domain.vo.UserInfoVo;
import org.example.utils.Response;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Api(tags = "登录模块")
@RequestMapping("/api")
public interface UserLoginService {

    @ApiOperation("用户登录")
    @PostMapping("/login")
    public Response<UserInfoVo> loginUser(@RequestBody User user);

    @ApiOperation("获取验证码")
    @GetMapping("/captcha")
    public Response<CaptchaVo> getCaptchaCode();
}
